home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
mcu11
/
examples.arc
/
EX4TEXT
< prev
next >
Wrap
Text File
|
1988-11-29
|
2KB
|
74 lines
* Program segments - not intended for assembly as is.
* On entry, A=data to be programmed and X=an EEPROM address
* "
* "
PROG LDAB #$02
STAB $103B Set EELAT bit (EEPGM=0)
STAA 0,X Store data to EEPROM address
LDAB #$03
STAB $103B Set EEPGM bit (EELAT=1)
JSR DLY10 Delay 10 mS
CLR $103B Turn off high voltage & set to read mode
* "
* "
* "
* "
BULKE LDAB #$06
STAB $103B Set to BULK erase mode
STAB $B600 Write any data to any EEPROM address
LDAB #$07
STAB $103B Turn on programming voltage
JSR DLY10 Delay 10 mS
CLR $103B Turn off high voltage & set to read mode
* "
* "
* On entry, X=any address in ROW to be erased
* "
* "
ROWE LDAB #$0E
STAB $103B Set to ROW erase mode
STAB 0,X Write any data to any address in ROW
LDAB #$0F
STAB $103B Turn on high voltage
JSR DLY10 Delay 10 mS
CLR $103B Turn off high voltage & set to read mode
* "
* "
* On entry, X=any address of BYTE to be erased
* "
* "
BYTEE LDAB #$16
STAB $103B Set to BYTE erase mode
STAB 0,X Write any data to address to be erased
LDAB #$17
STAB $103B Turn on high voltage
JSR DLY10 Delay 10 mS
CLR $103B Turn off high voltage & set to read mode
* "
* "
* On entry, A=data to be programmed into CONFIG
* "
* "
CNFCH LDAB #$06
STAB $103B Set to BULK erase mode
STAB $103F Write any data to CONFIG address
LDAB #$07
STAB $103B Turn on programming voltage
JSR DLY10 Delay 10 mS
LDAB #$02
STAB $103B Turn off EEPGM, leave EELAT on
STAA $103F Store new CONFIG data
LDAB #$03
STAB $103B Set EEPGM bit (EELAT=1)
JSR DLY10 Delay 10 mS
CLR $103B Turn off high voltage & set to read mode
* "
* "